﻿@using Easy.Web.CMS.Widget
@{
    var layOut = ViewData[Easy.Web.CMS.Layout.LayoutEntity.LayoutKey] as Easy.Web.CMS.Layout.LayoutEntity;
    if (layOut == null)
    {
        return;
    }
}
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="zh"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="zh"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="zh"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html class="not-ie" lang="zh">
<!--<![endif]-->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <title>[设计]@layOut.Page.Title</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    @StyleAtHead()
    @ScriptAtHead()
    @if (!layOut.Theme.IsNullOrEmpty())
    {
        <link type="text/css" rel="stylesheet" href="@Url.Content("~/Themes/{0}/css/Theme.css".FormatWith(layOut.Theme))" />
    }
</head>
<body class="front">
    <nav id="toolBar" class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="row">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand"><span class="badge">页面设计</span></a>
                </div>
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">
                        <li>
                            <a>
                                <label class="checkbox-inline">
                                    <input class="helper" data-class="design-border" type="checkbox" autocomplete="off" checked />
                                    <span>
                                        边框(显示空区域)
                                    </span>
                                </label>
                            </a>
                        </li>
                        <li>
                            <a>
                                <label class="checkbox-inline">
                                    <input class="helper" data-class="hideToolBar" type="checkbox" autocomplete="off" checked />
                                    <span>
                                        工具栏
                                    </span>
                                </label>
                            </a>
                        </li>
                    </ul>
                    <div class="navbar-form navbar-right">
                        <div class="btn-group">
                            <a class="btn btn-primary" href="@Url.Action("RedirectView", "Page", new { module = "Common", ID = layOut.Page.ID })">
                                <i class="glyphicon glyphicon-search"></i>
                                预览
                            </a>
                            <a class="btn btn-primary" href="@Url.Action("Index", "Page", new { module = "Common", PageID = layOut.Page.ID })">
                                <i class="glyphicon glyphicon-th"></i>
                                概览
                            </a>
                            <a class="btn btn-primary" href="@Url.Action("Design", "Layout", new {module = "Common", ID = layOut.ID ,PageID=layOut.Page.ID})">
                                <i class="glyphicon glyphicon-th-list"></i>
                                布局
                            </a>
                            <a class="btn btn-primary" href="@Url.Action("Edit", "Page", new {module = "Common", ID = layOut.Page.ID})">
                                <i class="glyphicon glyphicon-edit"></i>
                                属性
                            </a>
                            <a class="btn btn-primary" href="@Url.Action("SelectWidget", "WidgetTemplate", new {module = "Common", pageId = layOut.Page.ID})">
                                <i class="glyphicon glyphicon-share-alt"></i>
                                添加组件
                            </a>
                            @Html.Partial("Partial.Menu", layOut)
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </nav>
    <div id="container" class="@layOut.ContainerClass pagePreview design-border">
        @RenderBody()
    </div>

    @StyleAtFoot()
    @ScriptAtFoot()
    @if (!layOut.Style.IsNullOrEmpty())
    {
        <link href="@Url.Content(layOut.Style)" rel="stylesheet" />

    }
    @if (!layOut.Page.Style.IsNullOrEmpty())
    {
        <link href="@Url.Content(layOut.Page.Style)" rel="stylesheet" />

    }
    @if (!layOut.Script.IsNullOrEmpty())
    {
        <script type="text/javascript" src="@Url.Content(layOut.Script)"></script>
    }
    @if (!layOut.Page.Script.IsNullOrEmpty())
    {
        <script type="text/javascript" src="@Url.Content(layOut.Page.Script)"></script>
    }
</body>
</html>
